<?php
// 根据一级返回二级
include 'base.php';
$goodsitem = $_POST['goodsitem'];

$sql = "SELECT * FROM `goods` where `cat_two_id`='$goodsitem' limit 10";

$res = $conn->query($sql);

$arr = array();
while($row = mysqli_fetch_assoc($res)) {
  
  array_push($arr, $row);
}

echo json_encode($arr);